package com.resou.reader.bookdetail;

import android.app.Activity;
import android.content.Context;

import com.resou.reader.api.entry.BaseComment;
import com.resou.reader.api.entry.CommentBean;
import com.resou.reader.api.entry.TypeBean;
import com.resou.reader.base.BasePresenter;
import com.resou.reader.base.BaseView;
import com.umeng.socialize.UMShareListener;
import com.umeng.socialize.media.Base;

import java.util.List;

/**
 * Author: 萤火虫
 * E-mail:  Allensuns@163.com
 * Description: 书详接口包装类
 * CreateTime: 2019-04 -10
 **/
public interface IBookDetailContract {

    /**
     * View接口层
     */
    interface IBookDetailView extends BaseView {
        /**
         * 数据请求成功，需要更新显示
         */
        void initViewData(List<Object> list);

        /**
         * 更新“加入书架”按钮
         */
        void refreshAddToShelfBtn(boolean isAdded);

        /**
         * 获取当前View对应的Context
         *
         * @return @link {Context}
         */
        Context getViewContext();

        /**
         * 刷新RecyclerView 指定Item
         *
         * @param
         */
        void refreshRecyclerItem(List<TypeBean> list);

        void refreshCommentItem(List<BaseComment.DataBean> list, String total);

        void refreshLike(int count);
    }

    /**
     * Presenter 接口层
     */
    interface IBookDetailPresenter extends BasePresenter {
        /**
         * 启动目录
         */
        void startCatalogueActivity(Activity context);

        void init(String bookId);

        void checkWhetherCollection();

        void getBookDetailAndCommentAndRecommend(String bookId);

        void addToBookShelf(String token);

        void startToBookDetail(int index);

        //开始阅读
        void startToReader(Activity activity);


        void startToReaderLastChapter(Activity activity);

        void share(Activity activity, UMShareListener shareListener);

        void like();

//        void publishComment(final Activity activity, String str);

        //    推荐接口
        void getTypeList();

        //获取评论接口
        void getCommentList();

        /**
         * 启动评论页
         */
        void startComment();

        void addToBookShelf2();
    }

}
